package com.mlizhi.base;

import com.mlizhi.kingdom.R;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

/**
 * 时时检测网络是否可用
 */
public class NetWorkBroadcastReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
		boolean mState = NetWorkManager.getNewInstance().isNetworkConnected(context);
		if (!mState) {
			Toast.makeText(context, R.string.net_connected_failure,Toast.LENGTH_LONG).show();
		}
	}
}
